#![allow(dead_code, unused_variables, unused_imports, unused_macros)]

// 基础概念模块
mod basic {
    pub mod array;
    pub mod attributes;
    pub mod conversion;
    pub mod r#enum;
    pub mod generics;
    pub mod iterators;
    pub mod modules;
    pub mod phantom_types;
    pub mod raw_identifiers;
    pub mod scalar;
    pub mod scoping_rules;
    pub mod testing;
    pub mod traits;
    pub mod tuple;
    pub mod unsafe_operations;
    pub mod variable_bindings;
}

// 数据结构模块
mod data_structures {
    pub mod hash_map;
    pub mod hash_set;
    pub mod std_types;
    pub mod string;
    pub mod r#struct;
    pub mod vec;
}

// 流程控制模块
mod flow_control {
    pub mod condition;
    pub mod r#loop;
    pub mod pattern_match;
}

// 错误处理模块
mod error_handling {
    pub mod option;
    pub mod panic;
    pub mod result;
    pub mod std_errors;
}

// 兼容性模块
mod compatibility {
    pub mod compatibility;
    pub mod meta;
}

// 并发模块
mod concurrency {
    pub mod message_passing;
    pub mod send_sync;
    pub mod shared_state;
    pub mod threads;
}

// 高级概念模块
mod advanced {
    pub mod closures;
    pub mod declarative_macros;
    pub mod lifetimes;
}

fn main() {
    println!("Rust 基础概念演示程序");
    println!("使用 cargo test 运行所有测试示例");
}

#[cfg(test)]
mod tests {
    use super::*;

    #[test]
    fn test_all_modules() {
        // 测试所有模块是否能正常编译和运行
        // 具体测试在各模块内部完成
    }
}
